#! /usr/bin/env python

PACKAGE = "opencv_apps"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

gen.add("use_camera_info", bool_t, 0, "Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.", False)
threshold_type = gen.enum([gen.const("Binary",   int_t,  0, "Binary"),
                           gen.const("Binary_Inverted",   int_t,  1, "Binary Inverted"),
                           gen.const("Threshold_Truncated",   int_t,  2, "Threshold Truncated"),
                           gen.const("Threshold_To_Zero",   int_t,  3, "Threshold to Zero"),
                           gen.const("Threshold_To_Zero_Inverted",   int_t,  4, "Threshold to zero inverted"),],
                          "An enum for Threshold Types")

gen.add("apply_otsu", bool_t, 0, "Apply otsu threshold", False)
gen.add("threshold_type", int_t, 0, "Threshold Type", 0, 0, 4, edit_method=threshold_type)
gen.add("threshold", int_t, 0, "Threshold value", 150, 0, 255)
gen.add("max_binary", int_t, 0, "Max Binary value", 255, 0, 255)

exit(gen.generate(PACKAGE, "threshold", "Threshold"))
